package com.fzu.messageservice.config;

import com.fzu.messageservice.websocket.TioWebsocketStarter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @create: 2023-04-10 18:36
 **/
@Component
@Slf4j
public class ImApplicationRunner implements ApplicationRunner {
    @Autowired
    private TioWebsocketStarter tioWebsocketStarter;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("执行ImApplicationRunner方法");
        tioWebsocketStarter.start();
    }
}
